home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Files / XTND 1.3.6 / Translator Examples / MacWrite Translator / MakeFile < prev   
Encoding:
Makefile  |  1991-05-01  |  2.3 KB  |  62 lines  |  [TEXT/MPS ]

  1. #################################################################################
  2. #    File:    MakeFile for the MacWrite translator                        #
  3. #    Target:    MacWrite                                                #
  4. #################################################################################
  5.  
  6. TranslatorName = MacWrite    ### Whatever you like, but try to be descriptive
  7.  
  8. Creator = 'Clrs'            ### This may be changed if you like (if you want to use a different icon, for instance
  9. Type = 'Fltr'                ### This must not be changed
  10.  
  11. ResTypeIn = 'FLTI'            ### This is for text import translators
  12. ResNumIn = 137                ### Your choice, but must match the number in the FTYP resource
  13. ResTypeOut = 'FLTE'            ### This is for text export translators
  14. ResNumOut = 138            ### Your choice, but must match the number in the FTYP resource
  15.  
  16. Sources = MacWriteImport.c ∂
  17.         MacWriteExport.c ∂
  18.         CodeA5Globals.c    ### For documentation only, not used by make
  19.  
  20. HeaderPath = :::XTND Headers:XTNDCIncludes:        ### Change this if you reorganize the folder structure
  21.  
  22. Headers = MacWrite.h ∂
  23.         CodeA5Globals.h ∂
  24.         "{HeaderPath}"XTNDInterface.h ∂
  25.         "{HeaderPath}"XTNDTextTranslator.h        ### Required headers for a text import and export translator
  26.  
  27.  
  28. ### Default Dependency/Build Rule
  29.  
  30. .c.o ƒ .c {Headers}
  31.     C {Default}.c {COptions} -r -d MPW -d MPWC
  32.  
  33.  
  34. ### This copies the resources from MacWriteImport.π.rsrc into the translator file.  It
  35. ### deletes the old resource fork before adding the new resources.  This must be the
  36. ### first dependency for the target file, since it deletes all existing resources.
  37.  
  38. {TranslatorName} ƒƒ MacWrite.r MacWriteImport.π.rsrc MakeFile
  39.     Rez MacWrite.r -t {Type} -c {Creator} ∂
  40.         -o {TranslatorName}
  41.  
  42.  
  43. ### This puts the import code into the resource type and number specified above in the translator file
  44.  
  45. {TranslatorName} ƒƒ MacWriteImport.c.o CodeA5Globals.c.o MakeFile
  46.     Link -rt {ResTypeIn}={ResNumIn} -m main -sg Main -sn Main="MacWrite - IN" ∂
  47.         MacWriteImport.c.o ∂
  48.         CodeA5Globals.c.o ∂
  49.         "{Libraries}"Interface.o ∂
  50.         "{Libraries}"RunTime.o ∂
  51.         -o {TranslatorName}
  52.  
  53. ### This puts the export code into the resource type and number specified above in the translator file
  54.  
  55. {TranslatorName} ƒƒ MacWriteExport.c.o CodeA5Globals.c.o MacWriteExport.h MakeFile
  56.     Link -rt {ResTypeOut}={ResNumOut} -m main -sg Main -sn Main="MacWrite - OUT" ∂
  57.         MacWriteExport.c.o ∂
  58.         CodeA5Globals.c.o ∂
  59.         "{Libraries}"Interface.o ∂
  60.         "{Libraries}"RunTime.o ∂
  61.         -o {TranslatorName}
  62.